package org.bling.star.common.connect;

import java.io.Serializable;

/**
 * @Describe: 秘钥
 * @Date: 2024/5/22
 * @Author: szz
 */
public class CommandStreamKey implements Serializable {
    private static final long serialVersionUID = 6413450686404367350L;
    private String streamKey;
    private Integer count;
    private Boolean allowIn;

    public CommandStreamKey() {
    }

    public CommandStreamKey(String streamKey, Integer count, Boolean allowIn) {
        this.streamKey = streamKey;
        this.count = count;
        this.allowIn = allowIn;
    }

    public String getStreamKey() {
        return this.streamKey;
    }

    public Integer getCount() {
        return this.count;
    }

    public Boolean getAllowIn() {
        return this.allowIn;
    }

    public void setStreamKey(String streamKey) {
        this.streamKey = streamKey;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public void setAllowIn(Boolean allowIn) {
        this.allowIn = allowIn;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof CommandStreamKey)) return false;
        final CommandStreamKey other = (CommandStreamKey) o;
        if (!other.canEqual(this)) return false;
        final Object this$streamKey = this.getStreamKey();
        final Object other$streamKey = other.getStreamKey();
        if (this$streamKey == null ? other$streamKey != null : !this$streamKey.equals(other$streamKey)) return false;
        final Object this$count = this.getCount();
        final Object other$count = other.getCount();
        if (this$count == null ? other$count != null : !this$count.equals(other$count)) return false;
        final Object this$allowIn = this.getAllowIn();
        final Object other$allowIn = other.getAllowIn();
        return this$allowIn == null ? other$allowIn == null : this$allowIn.equals(other$allowIn);
    }

    protected boolean canEqual(final Object other) {
        return other instanceof CommandStreamKey;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $streamKey = this.getStreamKey();
        result = result * PRIME + ($streamKey == null ? 43 : $streamKey.hashCode());
        final Object $count = this.getCount();
        result = result * PRIME + ($count == null ? 43 : $count.hashCode());
        final Object $allowIn = this.getAllowIn();
        result = result * PRIME + ($allowIn == null ? 43 : $allowIn.hashCode());
        return result;
    }

    public String toString() {
        return "CommandStreamKey(streamKey=" + this.getStreamKey() + ", count=" + this.getCount() + ", allowIn=" + this.getAllowIn() + ")";
    }
}
